﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria;
using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
using Terraria.ModLoader;

namespace EAMF.Content.NPCs.Monster
{
    public class PartyZombie : ModNPC
    {
        public override void SetStaticDefaults()
        {
            Main.npcFrameCount[NPC.type] = 3;
        }
        public override void SetDefaults()
        {
            NPC.width = 34;
            NPC.height = 162 / 3;
            NPC.damage = 200;
            NPC.lifeMax = 1100;
            NPC.defense = 100;
            NPC.knockBackResist = 0f;
            NPC.aiStyle = -1;
            NPC.HitSound = SoundID.NPCHit1;
            NPC.DeathSound = SoundID.NPCDeath6;
            NPC.value = Item.buyPrice(0, 0, 15, 0);
            NPC.buffImmune[BuffID.Poisoned] = true;
            NPC.buffImmune[BuffID.Venom] = true;
            Banner = NPC.type;
            BannerItem = ItemID.Gel;
            Main.npcFrameCount[NPC.type] = 3;
            NPC.noGravity = false;
            NPC.noTileCollide = false;
            AIType = -3;//这边为了方便直接写了ID（绝对不是懒
            AnimationType = -3;
            NPC.boss = true;
        }
        public override float SpawnChance(NPCSpawnInfo spawnInfo)
        {
            if (Main.bloodMoon)
                return 1.0f;
            return 0.25f;
        }
        public override void ModifyNPCLoot(NPCLoot npcloot)
        {
            // 2% 几率掉落
            if (Main.rand.NextBool(50))
            {

                //具体内容可以试试自动补全
            }
            npcloot.Add(ItemDropRule.Common(ItemID.Sapphire, 1, 5, 10));
        }
    }
}
